package com.wrs.project.module.videoplayer;

import android.content.Context;
import android.util.AttributeSet;
import android.util.Log;
import android.widget.SeekBar;

import com.shuyu.gsyvideoplayer.video.StandardGSYVideoPlayer;

public class MyStandardGSYVideoPlayer extends StandardGSYVideoPlayer {

    private String tag = "MyStandardGSYVideoPlayer====";
    public MyStandardGSYVideoPlayer(Context context, Boolean fullFlag) {
        super(context, fullFlag);
    }

    public MyStandardGSYVideoPlayer(Context context) {
        super(context);
    }

    public MyStandardGSYVideoPlayer(Context context, AttributeSet attrs) {
        super(context, attrs);
    }

    @Override
    public int getLayoutId() {
//        return super.getLayoutId();
        return R.layout.layout_videoplayer;
    }

    @Override
    public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
        super.onProgressChanged(seekBar, progress, fromUser);
        int width = seekBar.getWidth();
        // 毫秒
        long time = progress * getDuration() / 100;

        Log.e(tag, "progress:" + progress + " time:" + time);
    }
}
